package com.zlf.sb.demo.design.zh;

import lombok.extern.slf4j.Slf4j;

/***
 *@title BaseAwardTemplate
 *@description <TODO description class purpose>
 *@author wgc_j
 *@version 1.0.0
 *@create 2025-02-19 10:35
 **/
@Slf4j
public abstract class BaseAwardTemplate {

    //奖励发放模板方法
    public Boolean awardTemplate(String userId) {
        this.authentication(userId);
        this.risk(userId);
        return this.awardRecord(userId);
    }

    //身份验证
    protected void authentication(String userId) {
        log.info("{} 执行身份验证!", userId);
    }

    //风控
    protected void risk(String userId) {
        log.info("{} 执行风控校验!", userId);
    }

    //执行奖励发放
    protected abstract Boolean awardRecord(String userId);
}
